<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>在需要使用弹框的地方写下如下代码即可 | VueDialog</title>
    <meta name="generator" content="VuePress 1.8.2">
    
    <meta name="description" content="函数式vue弹框组件">
    
    <link rel="preload" href="/assets/css/0.styles.cc89e670.css" as="style"><link rel="preload" href="/assets/js/app.788a47ea.js" as="script"><link rel="preload" href="/assets/js/2.7e7556ec.js" as="script"><link rel="preload" href="/assets/js/11.fc2c4f3c.js" as="script"><link rel="prefetch" href="/assets/js/10.b84ad5d4.js"><link rel="prefetch" href="/assets/js/12.9c54e5b5.js"><link rel="prefetch" href="/assets/js/13.ac599485.js"><link rel="prefetch" href="/assets/js/14.1e4ace2f.js"><link rel="prefetch" href="/assets/js/15.39a933fd.js"><link rel="prefetch" href="/assets/js/3.c3e77ff5.js"><link rel="prefetch" href="/assets/js/4.23df146b.js"><link rel="prefetch" href="/assets/js/5.8e9108c5.js"><link rel="prefetch" href="/assets/js/6.16373f7f.js"><link rel="prefetch" href="/assets/js/7.fd48b8cc.js"><link rel="prefetch" href="/assets/js/8.bb0177c6.js"><link rel="prefetch" href="/assets/js/9.c3c48dac.js">
    <link rel="stylesheet" href="/assets/css/0.styles.cc89e670.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/assets/logo.png" alt="VueDialog" class="logo"> <span class="site-name can-hide">VueDialog</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">
  首页
</a></div><div class="nav-item"><a href="/zh/guide/example/" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  快速开始
</a></div><div class="nav-item"><a href="/zh/guide/api/" class="nav-link">
  API
</a></div><div class="nav-item"><a href="/zh/guide/api/" class="nav-link">
  在线Demo
</a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
  首页
</a></div><div class="nav-item"><a href="/zh/guide/example/" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  快速开始
</a></div><div class="nav-item"><a href="/zh/guide/api/" class="nav-link">
  API
</a></div><div class="nav-item"><a href="/zh/guide/api/" class="nav-link">
  在线Demo
</a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>指南</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/zh/guide/start/" class="sidebar-link">快速开始</a></li><li><a href="/zh/guide/start/option.html" class="sidebar-link">option配置</a></li><li><a href="/zh/guide/start/defaultOption.html" class="sidebar-link">option默认值</a></li></ul></section></li><li><a href="/zh/guide/api/" class="sidebar-link">API</a></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>示例</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/zh/guide/example/" aria-current="page" class="active sidebar-link">代码示例</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/zh/guide/example/#最简配置-type-html" class="sidebar-link">最简配置-- type: &quot;html&quot;</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#打开-vue-组件并且向子组件传递数据-type-vue" class="sidebar-link">打开 vue 组件并且向子组件传递数据-- type: &quot;vue&quot;</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#打开-dom-对象对话框-type-dom" class="sidebar-link">打开 Dom 对象对话框-- type: &quot;dom&quot;</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#打开指定弹框大小-area" class="sidebar-link">打开指定弹框大小-- area</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#有遮罩-点击遮罩不关闭弹框-shade" class="sidebar-link">有遮罩，点击遮罩不关闭弹框-- shade</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#有遮罩-点击遮罩即可关闭弹框-shade-blank" class="sidebar-link">有遮罩，点击遮罩即可关闭弹框-- shade，blank</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#可以拖动的弹框-move" class="sidebar-link">可以拖动的弹框-- move</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#无头部的弹框-hashead" class="sidebar-link">无头部的弹框-- hasHead</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#无最小化的弹框-hasmin" class="sidebar-link">无最小化的弹框-- hasMin</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#无最大化的弹框-hasmin" class="sidebar-link">无最大化的弹框-- hasMin</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#仅有关闭按钮的弹框-hasmin、hasmax" class="sidebar-link">仅有关闭按钮的弹框-- hasMin、hasMax</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#弹框最小化距离底部距离-bottomoff" class="sidebar-link">弹框最小化距离底部距离-- bottomOff</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#弹框最小化距离左部距离-leftoff" class="sidebar-link">弹框最小化距离左部距离-- leftOff</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#设置最小化高度-minhight" class="sidebar-link">设置最小化高度-- minHight</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#设置最小化宽度-minwidth" class="sidebar-link">设置最小化宽度-- minWidth</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#设置最小化宽度行间距-rowgap" class="sidebar-link">设置最小化宽度行间距-- rowGap</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#设置最小化宽度列间距-colgap" class="sidebar-link">设置最小化宽度列间距-- colGap</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我是自定义头部-customhead" class="sidebar-link">我是自定义头部-- customHead</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我是单弹框模式-multiple" class="sidebar-link">我是单弹框模式-- multiple</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我是自定义主题-theme" class="sidebar-link">我是自定义主题-- theme</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我是深蓝主题-theme" class="sidebar-link">我是深蓝主题-- theme</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我是墨绿主题-theme" class="sidebar-link">我是墨绿主题-- theme</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我带有打开成功回调-success" class="sidebar-link">我带有打开成功回调-- success</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我带有关闭成功回调-cancel" class="sidebar-link">我带有关闭成功回调-- cancel</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我带有最小化成功回调-minback" class="sidebar-link">我带有最小化成功回调-- minBack</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我带有最大化成功回调-maxback" class="sidebar-link">我带有最大化成功回调-- maxBack</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我带有复原成功回调-restore" class="sidebar-link">我带有复原成功回调-- restore</a></li><li class="sidebar-sub-header"><a href="/zh/guide/example/#我带有混淆功能-mixin" class="sidebar-link">我带有混淆功能-- mixin</a></li></ul></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>联系我们</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/zh/guide/our/" class="sidebar-link">联系我们</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="在需要使用弹框的地方写下如下代码即可"><a href="#在需要使用弹框的地方写下如下代码即可" class="header-anchor">#</a> 在需要使用弹框的地方写下如下代码即可</h1> <h2 id="最简配置-type-html"><a href="#最简配置-type-html" class="header-anchor">#</a> 最简配置-- type: &quot;html&quot;</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;我是html&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="打开-vue-组件并且向子组件传递数据-type-vue"><a href="#打开-vue-组件并且向子组件传递数据-type-vue" class="header-anchor">#</a> 打开 vue 组件并且向子组件传递数据-- type: &quot;vue&quot;</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">import</span> test <span class="token keyword">from</span> <span class="token string">&quot;./test.vue&quot;</span><span class="token punctuation">;</span>
<span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---vue&quot;</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;vue&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> test<span class="token punctuation">,</span>
    subData<span class="token operator">:</span> <span class="token string">&quot;我是外部传递的数据&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="打开-dom-对象对话框-type-dom"><a href="#打开-dom-对象对话框-type-dom" class="header-anchor">#</a> 打开 Dom 对象对话框-- type: &quot;dom&quot;</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---dom&quot;</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;dom&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">.</span>$el<span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="打开指定弹框大小-area"><a href="#打开指定弹框大小-area" class="header-anchor">#</a> 打开指定弹框大小-- area</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题&quot;</span><span class="token punctuation">,</span>
  area<span class="token operator">:</span> <span class="token punctuation">{</span>
    height<span class="token operator">:</span> <span class="token string">&quot;400px&quot;</span><span class="token punctuation">,</span>
    width<span class="token operator">:</span> <span class="token string">&quot;800px&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;宽800px，高400px&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="有遮罩-点击遮罩不关闭弹框-shade"><a href="#有遮罩-点击遮罩不关闭弹框-shade" class="header-anchor">#</a> 有遮罩，点击遮罩不关闭弹框-- shade</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  shade<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;shade: true&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="有遮罩-点击遮罩即可关闭弹框-shade-blank"><a href="#有遮罩-点击遮罩即可关闭弹框-shade-blank" class="header-anchor">#</a> 有遮罩，点击遮罩即可关闭弹框-- shade，blank</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  shade<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
  blank<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;shade: true,blank:true&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="可以拖动的弹框-move"><a href="#可以拖动的弹框-move" class="header-anchor">#</a> 可以拖动的弹框-- move</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  move<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;move: true&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="无头部的弹框-hashead"><a href="#无头部的弹框-hashead" class="header-anchor">#</a> 无头部的弹框-- hasHead</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  hasHead<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;hasHead: false&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="无最小化的弹框-hasmin"><a href="#无最小化的弹框-hasmin" class="header-anchor">#</a> 无最小化的弹框-- hasMin</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  hasMin<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;hasMin: false&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="无最大化的弹框-hasmin"><a href="#无最大化的弹框-hasmin" class="header-anchor">#</a> 无最大化的弹框-- hasMin</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  hasMax<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;hasMax: false&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="仅有关闭按钮的弹框-hasmin、hasmax"><a href="#仅有关闭按钮的弹框-hasmin、hasmax" class="header-anchor">#</a> 仅有关闭按钮的弹框-- hasMin、hasMax</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  hasMin<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
  hasMax<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  hasMin: false,hasMax: false&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="弹框最小化距离底部距离-bottomoff"><a href="#弹框最小化距离底部距离-bottomoff" class="header-anchor">#</a> 弹框最小化距离底部距离-- bottomOff</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  bottomOff<span class="token operator">:</span> <span class="token number">500</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;bottomOff: 500&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="弹框最小化距离左部距离-leftoff"><a href="#弹框最小化距离左部距离-leftoff" class="header-anchor">#</a> 弹框最小化距离左部距离-- leftOff</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  leftOff<span class="token operator">:</span> <span class="token number">500</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;leftOff: 500&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="设置最小化高度-minhight"><a href="#设置最小化高度-minhight" class="header-anchor">#</a> 设置最小化高度-- minHight</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  minHight<span class="token operator">:</span> <span class="token number">30</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  minHight: 30,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="设置最小化宽度-minwidth"><a href="#设置最小化宽度-minwidth" class="header-anchor">#</a> 设置最小化宽度-- minWidth</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  minWidth<span class="token operator">:</span> <span class="token number">400</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;   minWidth: 400,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="设置最小化宽度行间距-rowgap"><a href="#设置最小化宽度行间距-rowgap" class="header-anchor">#</a> 设置最小化宽度行间距-- rowGap</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  minWidth<span class="token operator">:</span> <span class="token number">400</span><span class="token punctuation">,</span>
  rowGap<span class="token operator">:</span> <span class="token number">50</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;rowGap:50,,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="设置最小化宽度列间距-colgap"><a href="#设置最小化宽度列间距-colgap" class="header-anchor">#</a> 设置最小化宽度列间距-- colGap</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  minWidth<span class="token operator">:</span> <span class="token number">400</span><span class="token punctuation">,</span>
  colGap<span class="token operator">:</span> <span class="token number">50</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;colGap:50,,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我是自定义头部-customhead"><a href="#我是自定义头部-customhead" class="header-anchor">#</a> 我是自定义头部-- customHead</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---vue&quot;</span><span class="token punctuation">,</span>
  move<span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
  customHead<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;vue&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> testHead<span class="token punctuation">,</span>
    subData<span class="token operator">:</span> <span class="token string">&quot;我是传递的数据&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;我是自定义头部&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我是单弹框模式-multiple"><a href="#我是单弹框模式-multiple" class="header-anchor">#</a> 我是单弹框模式-- multiple</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  multiple<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt; multiple: false,,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我是自定义主题-theme"><a href="#我是自定义主题-theme" class="header-anchor">#</a> 我是自定义主题-- theme</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  theme<span class="token operator">:</span> <span class="token string">&quot;theme_my&quot;</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  theme: theme_my,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我是深蓝主题-theme"><a href="#我是深蓝主题-theme" class="header-anchor">#</a> 我是深蓝主题-- theme</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  theme<span class="token operator">:</span> <span class="token string">&quot;theme-lan&quot;</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  theme: theme-lan&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我是墨绿主题-theme"><a href="#我是墨绿主题-theme" class="header-anchor">#</a> 我是墨绿主题-- theme</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  theme<span class="token operator">:</span> <span class="token string">&quot;theme-lv&quot;</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  theme: theme-lv&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我带有打开成功回调-success"><a href="#我带有打开成功回调-success" class="header-anchor">#</a> 我带有打开成功回调-- success</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  <span class="token function-variable function">success</span><span class="token operator">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;打开成功&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  success: function,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我带有关闭成功回调-cancel"><a href="#我带有关闭成功回调-cancel" class="header-anchor">#</a> 我带有关闭成功回调-- cancel</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  <span class="token function-variable function">cancel</span><span class="token operator">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;关闭成功&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  cancel: function,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我带有最小化成功回调-minback"><a href="#我带有最小化成功回调-minback" class="header-anchor">#</a> 我带有最小化成功回调-- minBack</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  <span class="token function-variable function">minBack</span><span class="token operator">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;最小化成功&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  minBack: function,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我带有最大化成功回调-maxback"><a href="#我带有最大化成功回调-maxback" class="header-anchor">#</a> 我带有最大化成功回调-- maxBack</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  <span class="token function-variable function">maxBack</span><span class="token operator">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;最大化成功&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  maxBack: function,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我带有复原成功回调-restore"><a href="#我带有复原成功回调-restore" class="header-anchor">#</a> 我带有复原成功回调-- restore</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  <span class="token function-variable function">restore</span><span class="token operator">:</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;复原成功&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  restore: function,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h2 id="我带有混淆功能-mixin"><a href="#我带有混淆功能-mixin" class="header-anchor">#</a> 我带有混淆功能-- mixin</h2> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">this</span><span class="token punctuation">.</span>$dialog<span class="token punctuation">.</span><span class="token function">open</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
  title<span class="token operator">:</span> <span class="token string">&quot;我是标题---html&quot;</span><span class="token punctuation">,</span>
  mixin<span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token function">created</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token function">alert</span><span class="token punctuation">(</span><span class="token string">&quot;我是混淆执行的成功&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  content<span class="token operator">:</span> <span class="token punctuation">{</span>
    type<span class="token operator">:</span> <span class="token string">&quot;html&quot;</span><span class="token punctuation">,</span>
    subCom<span class="token operator">:</span> <span class="token string">&quot;&lt;h1&gt;  mixin: Object,&lt;/h1&gt;&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/zh/guide/api/" class="prev">
        API
      </a></span> <span class="next"><a href="/zh/guide/our/">
        联系我们
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.788a47ea.js" defer></script><script src="/assets/js/2.7e7556ec.js" defer></script><script src="/assets/js/11.fc2c4f3c.js" defer></script>
  </body>
</html>
